package com.tarena.lbs.business.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tarena.lbs.business.pojo.po.StorePO;
import com.tarena.lbs.business.pojo.query.AreaStoreQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface StoreMapper extends BaseMapper<StorePO> {
    @Select({"<script>",
            "SELECT COUNT(*) FROM lbs_store WHERE province_id IN",
            "<foreach collection='cityIdList' item='province_id' open='(' separator=',' close=')'>",
            "#{province_id}",
            "</foreach>",
            "</script>"})
    int selectByParenId(AreaStoreQuery query);
}
